import { createRouter, createWebHashHistory, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue';
import ProblemView from '../views/ProblemView.vue';
import ProblemSetView from '../views/ProblemSetView.vue';
import ProgressView from '../views/ProgressView.vue';
import ProfileView from '../views/ProfileView.vue';
// import HomeView from '../views/HomeView.vue';

const router = createRouter({
  // history: createWebHistory(import.meta.env.BASE_URL),  
  history: createWebHashHistory(),
  routes: [
    {
      path: '/login',
      component: ()=>import('../views/login/login.vue'),

    },

    {
      path:'',
      component: ()=>import('../layout/index.vue'),
      children:[
        {
          path: '',
          component: HomeView,
        },
        {
          path: '/problems',
          component: ProblemView,
        },
        {
          path: '/problem-sets',
          component: ProblemSetView,
        },
        {
          path: '/progress',
          component: ProgressView,
        },
        {
          path: '/profile',
          component: ProfileView,
        },

      ]
    }


  ],
})

export default router
